const data = [
    {
        "yearMonthVal": "2023-09",
        "newQty": 0,
        "remakeQty": 0,
        "finishedQty": 0
    },
    {
        "yearMonthVal": "2023-10",
        "newQty": 0,
        "remakeQty": 0,
        "finishedQty": 0
    },
    {
        "yearMonthVal": "2023-11",
        "newQty": 0,
        "remakeQty": 0,
        "finishedQty": 0
    },
    {
        "yearMonthVal": "2023-12",
        "newQty": 0,
        "remakeQty": 0,
        "finishedQty": 0
    },
    {
        "yearMonthVal": "2024-01",
        "newQty": 0,
        "remakeQty": 0,
        "finishedQty": 0
    },
    {
        "yearMonthVal": "2024-02",
        "newQty": 0,
        "remakeQty": 0,
        "finishedQty": 0
    },
    {
        "yearMonthVal": "2024-03",
        "newQty": 0,
        "remakeQty": 0,
        "finishedQty": 1
    },
    {
        "yearMonthVal": "2024-04",
        "newQty": 0,
        "remakeQty": 0,
        "finishedQty": 4
    },
    {
        "yearMonthVal": "2024-05",
        "newQty": 0,
        "remakeQty": 0,
        "finishedQty": 0
    },
    {
        "yearMonthVal": "2024-06",
        "newQty": 0,
        "remakeQty": 0,
        "finishedQty": 1
    },
    {
        "yearMonthVal": "2024-07",
        "newQty": 1,
        "remakeQty": 0,
        "finishedQty": 4
    },
    {
        "yearMonthVal": "2024-08",
        "newQty": 0,
        "remakeQty": 0,
        "finishedQty": 0
    }
]
let yearMonthVal = []
let newQty = []
let remakeQty = []
let finishedQty = []

data.forEach(item=>{
    yearMonthVal.push(item.yearMonthVal)
    newQty.push(item.newQty)
    remakeQty.push(item.remakeQty)
    finishedQty.push(item.finishedQty)
})

{
    "categories": yearMonthVal,
    "series": [
        {
            "name": "新建项目",
            "data": newQty
        },
        {
            "name": "既有改造",
            "data": remakeQty
        },
        {
            "name": "已完工",
            "data": finishedQty
        }
    ]
}